import type { IPageParams } from "./base";

//数据应用-接口声明文件
export interface IListParams extends IPageParams {
	createTimeEnd?: string;
	createTimeStart?: string;
	interfaceName?: string;
	interfaceStatus?: string;
	interfaceType?: "" | "db" | "third";
}

export interface IServiceApp {
	appName: string;
	appCode: string;
	requestparamName: string;
	interfaceId: string;
}

export interface IRequestParamList {
	requestparamCode: string;
	requestparamName: string;
	requestparamDefaultval: string;
	requestparamMethod?: string;
	requestparamDatetype?: string;
	requestparamJdbctype?: string;
	requestparamIsnull?: string;
	length?: number;
}

export interface IResultDataList {
	resultdataCode: string;
	resultdataDesc: string;
	resultdataJavatype: string;
	length: number;
}

export interface IListItemReturn {
	id?: number;
	interfaceId?: string;
	interfaceName: string;
	interfaceType?: "db" | "third";
	interfaceIsNeedAuth: "1" | "2";
	interfaceMethod: string;
	createTime?: string;
	interfaceDesc: string;
	interfaceStatus: string;
	interfaceExecuteType?: string;
	interfaceSqlmode?: string;
	interfaceReturnType?: string;
	interfaceExecuteSql?: string;
	interfaceUrl?: string;
	interThirdCallmode?: string;
	interThirdAuthUrl?: string;
	interThirdAuthMethod?: string;
	interThirdAuthUser?: string;
	interThirdAuthUserKey?: string;
	interThirdAuthTokenKey?: string;
	interThirdAuthPwd?: string;
	interThirdAuthPwdKey?: string;
	interThirdAuthResTokenKey?: string;
	interThirdAuthResTokenExpireKey?: string;
	databaseName?: string;
	pgMode?: string;
	dataSourceCode?: string;
	interfaceCacheTime?: number;
	calllimitNumFailure?: number;
	calllimitIntervalMax?: number;
	calllimitNumMax?: number;
	interfaceStartDate?: string;
	interfaceEndDate?: string;
	requestParamList?: IRequestParamList[];
	resultDataList?: IResultDataList[];
	serviceAppList?: IServiceApp[];
}

export interface ITestParams extends IPageParams {
	interfaceId: string;
}

export interface IApplicationsParams extends IPageParams {
	keyWord?: string;
}
